package com.skypan.myapplication;

import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;
import android.widget.Toast;


import androidx.appcompat.app.AppCompatActivity;

import com.lidroid.xutils.db.table.Id;
import com.skypan.myapplication.bean.LoginR;


public class MydataActivity extends AppCompatActivity {

    private TextView m1;
    private TextView m2;
    private TextView m3;
    private TextView m4;
    private TextView m5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_mydata);
        m1 = findViewById(R.id.txt_my_data_id);
        m1.setText(userId);
        m2 = findViewById(R.id.txt_my_data_name);
        m2.setText(userName);
        m3 = findViewById(R.id.txt_my_data_account);
        m3.setText(userAccount);
        m4 = findViewById(R.id.txt_my_data_identity);
        if(userIdentity.equals("0")){
            m4.setText("系统管理员");
        }else if(userIdentity.equals("1")){
            m4.setText("监管部门人员");
        }
        else if(userIdentity.equals("2")){
            m4.setText("生产企业管理人员");
        }
        else if(userIdentity.equals("3")){
            m4.setText("生产企业操作人员");
        }
        else if(userIdentity.equals("4")){
            m4.setText("物流公司人员");
        }
        else if(userIdentity.equals("5")){
            m4.setText("接种单位人员");
        }else if(userIdentity.equals("6")){
            m4.setText("终端客户");
        }

        m5 = findViewById(R.id.txt_my_data_companyid);
        m5.setText(companyId);
    }


    LoginR localuser = LocalDataApplication.getInstance().getLocalResponse();
    String userId = localuser.data.userId;
    String userName = localuser.data.userName;
    String userAccount = localuser.data.userAccount;
    String userIdentity = localuser.data.userIdentity;
    String companyId = localuser.data.companyId;

}
